package com.zero.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;




@Controller
public class IndexController {



    @RequestMapping("/")
    public ModelAndView root(){
        ModelAndView mav=new ModelAndView();
        mav.setViewName("index");
        mav.addObject("title","首页");
        return mav;
    }


    /**
     * 功能描述:登陆请求
     *
     * @param:
     * @return:
     * @auther: 某人的目光
     * @date: 2019/3/17 15:41
     */
    @RequestMapping("/login")
    public String login(){
        return "/login";
    }


    /**
     * 功能描述:登陆请求
     *
     * @param:
     * @return:
     * @auther: 某人的目光
     * @date: 2019/3/17 15:41
     */
    @RequestMapping("/admin")
    public String toAdmin(){
        return "/admin/main";
    }
}
